(function($){
	function formResult(msg, state) {
        layer.closeAll();
        if(state == 0) {
            layer.alert(msg, {icon: 5});
        } else {
            layer.confirm('修改成功！', {icon: 6, title:'系统提示', btn: ['确定']}, function(index){
                location.href = $('#form_update').attr('urlList')
            });
        }
    }
    $(function(){
    	window.formResult = formResult;
    	$(".changeState").click(function(){
    		var _this = $(this);
    		var state = _this.attr('dstate');
    		var url = _this.attr('durl');
    		if(state == 1){
    			var message = '是否恢复此条数据？';
    		}else{
    			var message = '是否删除此条数据？';
    		}
    		layer.confirm(message, {
    		    btn: ['是','否'] //按钮
    		}, function(){
    		    window.ifr_send_file.location.href=url;
    		});
    	})
    	
    });
})(jQuery);